<template>
    <div class="accretion_star_de">
             <div class="list"  v-for="(item,index) in redList" :key="index">
                 <div class="title">
                   <span>{{item.title}}</span>
                 </div>
                 <div class="list_data">
                     <div class="get_desc" v-for="value in item.data">{{value.desc}}获得{{value.integral}}积分</div>
                 </div>
             </div>



      <!--未开发时候显示-->
      <NoData v-if="flag"></NoData>
      <!--<p v-if="redList.length==0" style="font-size: 60px;color: #cccccc;position: absolute;left: 50%;top:50%;transform:translateY(-50);transform:translateX(-50%)">暂无数据...</p>-->
      <!--未开发时候显示-->
      <!--<div class="list">-->
        <!--<div class="title">-->
          <!--<span>积德</span>-->
        <!--</div>-->
        <!--<div class="list_data">-->

        <!--</div>-->
      <!--</div>-->

      <!--<div class="list">-->
        <!--<div class="title">-->
          <!--<span>积德</span>-->
        <!--</div>-->
        <!--<div class="list_data">-->

        <!--</div>-->
      <!--</div>-->

      <!--<div class="list">-->
        <!--<div class="title">-->
          <!--<span>积德</span>-->
        <!--</div>-->
        <!--<div class="list_data">-->

        <!--</div>-->
      <!--</div>-->

    </div>
</template>

<script>
    import NoData from '../../../components/nodata/NoData'
    export default {
        name: "AccretionStarDe",
        data(){
          return{
            redList:[],//红榜轮播数据
            flag:false,//是否显示暂无数据，默认不显示
          }
        },
      components:{
        NoData
      },



       created(){

           this.$emit('childData',this.$route.query.childdata);
           this.getRedList();
       },
      methods:{
        getRedList(){
          this.$http.get("api/ScreenkApi/getRedList?page=1&limit=10000",{vollege_id:this.$util.vollege_id},r=>{
            console.log('红榜：',r.data.data);
            this.redList=r.data.data;
            if (this.redList.length==0){
              this.flag=true;
            }



          });
        },//获取红榜的数据
      }



    }
</script>

<style scoped>
  .accretion_star_de{
    height: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    /*justify-content: space-between;*/
  }
  .list{
    /*width: 420px;*/
    width: 650px;
    height: 280px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 4px 16px #eee;
    border: 1px solid #e9e9e9;
    overflow: hidden;
    margin-right: 47px;
    margin-bottom: 43px;
  }
  .list:nth-child(2n+2){
    margin-right: 0px;
  }
  /*.list:nth-child(3n+3){*/
    /*margin-right: 0px;*/
  /*}*/
  .title{
    height: 53px;
    background: #02c070;
    color: white;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .list_data{
    flex: 1;
    box-sizing: border-box;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
  }
  .get_desc{
    line-height: 50px;
    box-sizing: border-box;
    padding-left: 10px;
    border-bottom: 1px solid #e9e9e9;
    font-size: 18px;
    color: black;
  }


</style>
